package com.rede.didiok.search.feign;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import com.rede.didiok.common.config.feign.FeignConfiguration;
import com.rede.didiok.common.utils.R;

/**
 * @Author: Rede
 * @DateTime: 2023-08-04 9:21
 * @Description: 远程调用 didiok-rank 服务的一系列接口
 */
@FeignClient(name = "didiok-rank", contextId = "didiok-rank2", configuration = FeignConfiguration.class)
public interface RankFeignService {

    /**
     * 根据attrId 查询属性信息
     * @param attrId
     * @return
     */
    @GetMapping("/rank/attr/info/{attrId}")
    public R attrInfo(@PathVariable("attrId") Long attrId);

    /**
     * 批量：根据榜单id列表，获取榜单信息
     * @param rankIds
     * @return
     */
    @GetMapping("/rank/rank/infos")
    public R ranksInfo(@RequestParam("rankIds") List<Long> rankIds);

    /**
     * 批量：根据等级id列表，获取等级信息
     * @param gradeIds
     * @return
     */
    @GetMapping("/rank/membergrade/infos")
    public R gradesInfo(@RequestParam("gradeIds") List<Long> gradeIds);

    /**
     * 根据分类id查询分类信息
     */
    @GetMapping("/rank/category/info/{catId}")
    public R categoryInfo(@PathVariable("catId") Long catId);
}
